<jsp:include page="header.jsp" />

<div id="page-wrapper">

	<div class="container-fluid">
		<!-- Page Heading -->
		<div class="row">
			<div class="col-lg-12">
				<h1 class="page-header">MetaQue Bank</h1>
				<ol class="breadcrumb">
					<li class="active"><i class="fa fa-dashboard"></i> Unanswered
						Questions</li>
				</ol>
			</div>
		</div>
		<!-- /.row -->
		<div ng-app="">
			<div ng-controller="myQuestionController">
				<div>
					<div class="col-lg-10 col-lg-offset-1 col-md-3"
						ng-repeat="quesList in quesList">
						<div class="col-lg-10 col-lg-offset-1">
							<div class="panel panel-default">
								<div class="panel-heading ">
									<h3 class="panel-title">
										<i class="fa fa-quote-left"></i> <a href="javascript:;"
											data-toggle="collapse" data-target="#{{quesList.qId}}">

											{{quesList.qTitle}}<i class="fa fa-quote-right"></i>
									</h3>
									</a> <br>
									<div>
										Posted By :  <a class="text-left ">{{quesList.postedBy}} </a> <span
											class="badge text-right col-sm-offset-9">Posted on : {{quesList.qAskedDate}}</span>
									</div>


								</div>
								<div class="panel-body collapse" id="{{quesList.qId}}">
									<div>{{quesList.qBody}} QUESTION BODY HERE</div>

									<div class="text-right">
										<a href="postAnswer.jsp">Post Your Answer <i
											class="fa fa-arrow-circle-right"></i></a>
									</div>
								</div>
							</div>
						</div>
						</div>
						</div>
						</div>
						</div>
					</div>
					<!-- /.container-fluid -->

				</div>


				<script>
					function myQuestionController($scope, $http) {
						
						$http
								.get(
										"http://localhost:8080/MetaQBank/rest/question/unansweredQuestions")
								.success(function(response) {

									$scope.quesList = response;

								});

					}
				</script>